package com.cbs.android.input;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.cbs.android.component.application.activity.CBSDialogFragment;
import com.cbs.android.component.log.L;
import com.cbs.android.function.input.ConfirmDialogFragment;

public class MainActivity extends AppCompatActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

//		List<String> items = new ArrayList<>();
//		items.add("1");
//		items.add("2");
//		items.add("3");
//		SelectDialogFragment selectDialogFragment = new SelectDialogFragment()
//				.setTitle("ceshi")
//				.setItems(items)
//				.setSelecter("2")
//				.setOnButtonListener(new SelectDialogFragment.OnButtonListener() {
//					@Override
//					public void onButtonClick(CBSDialogFragment dialogFragment, int i, String select) {
//						Log.e("test", i + "");
//					}
//				});
//		selectDialogFragment.show(getSupportFragmentManager(), "test");

//		InputDialogFragment inputDialogFragment = new InputDialogFragment();
//		inputDialogFragment.setLines(2);
//		inputDialogFragment.show(getSupportFragmentManager(), "test");

//		ButtonDialogFragment buttonDialogFragment = new ButtonDialogFragment();
//		buttonDialogFragment.setTitle("ceshi ");
//		buttonDialogFragment.setItems(items);
//		buttonDialogFragment.setOnButtonListener(new ButtonDialogFragment.OnButtonListener() {
//			@Override
//			public void onButtonClick(CBSDialogFragment dialogFragment, int which, String item) {
//				L.e("which", which + "");
//				L.e("item", item);
//			}
//		});
//		buttonDialogFragment.show(getSupportFragmentManager(), "test");

		ConfirmDialogFragment confirmDialogFragment = new ConfirmDialogFragment();
		confirmDialogFragment.setTitle("ceshi ");
		confirmDialogFragment.setCancel(true);
		confirmDialogFragment.setContent("ceshi 11111111");
		confirmDialogFragment.setsubmitMsg("ceshi 222");
		confirmDialogFragment.setOnConfirmListener(new ConfirmDialogFragment.OnConfirmListener() {
			@Override
			public void onConfirm(CBSDialogFragment dialogFragment) {
				L.e("test", "test");
			}
		});
		confirmDialogFragment.show(getSupportFragmentManager(), "test");
	}
}
